﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Index</title>
      @if (false)
   {
        <script src="../../../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
   }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>

    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)

         <script>
             if (top.boardtop) {
                 top.boardtop.head_txt.innerText = "信息考核分定义";
                 top.boardtop.showChooseYear(@ViewData["dqyear"], @ViewData["maxyear"], @ViewData["minyear"], rootPath + "/Admin/DocClsScore?fYear=");
             }
    </script>
    <script>
        $(function () {
            $("#toolMenu").smartFloat();
            var hdjsAlert = $("#hdjsAlert").val();
            if (hdjsAlert != "") {
                if (hdjsAlert == "操作成功") {
                    alert(hdjsAlert);
                }
                else {
                    alert(hdjsAlert);
                }
            }

            $("table input:checked").parent().parent().find(":text").removeAttr("disabled");
            $("table tr td input:checkbox").click(function () {
                if ($(this).is(":checked")) {
                    $(this).parent().parent().children("td").children("input:text").removeAttr("disabled");
                } else {
                    $(this).parent().parent().children("td").children("input:text").attr("value", "0");
                    $(this).parent().parent().children("td").children("input:text").attr("disabled", "disabled");
                }
            });
        });

        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnSave":
                    {
                        form1.submit();
                        break;
                    }
            }
        }

            function clearNoNum(obj) {
                //先把非数字的都替换掉，除了数字和.
                obj.value = obj.value.replace(/[^\d.]/g, "");
                //必须保证第一个为数字而不是.
                obj.value = obj.value.replace(/^\./g, "");
                //保证只有出现一个.而没有多个.
                obj.value = obj.value.replace(/\.{2,}/g, ".");
                //保证.只出现一次，而不能出现两次以上
                obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
                if (obj.value == "") {
                    obj.value = 0;
                }
            }

    </script>
</head>
<body style="	font-size: 12px;">
@using (Html.BeginForm("Save", "DocClsScore", FormMethod.Post, new { id = "form1" }))
{
    
     <div class="floatToolMenu" id="toolMenu">
        @Html.DevExpress().Menu(settings =>
   {
       settings.Name = "toolBarMenu";
       settings.ItemAutoWidth = false;
       settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
       settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
       settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
       settings.Items.Add(item =>
       {
           item.Name = "btnSave";
           item.Text = "保存";
           item.ClientEnabled = true;
           item.Image.Url = Url.Content("~/Content/ControlImages/filesave.png");

       });
       settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
       settings.ItemLinkMode = ItemLinkMode.ContentBounds;
   }).GetHtml()
   </div>
    <div>
  
   <table id="position" width="90%" align="center" border="0" class="tableForm">
                   <tr>
                        <th width="20%" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "编号"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</th>
                        <th width="20%" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "类别编号"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</th>
                        <th width="20%" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "类别名称"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</th>
                        <th width="20%" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "参与考核 "; settings.Properties.Style.Font.Bold = true; }).GetHtml()</th>
                        <th width="20%" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "录用得分"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</th>
                    </tr>   
                    @Html.Raw(ViewData["ShowList"].ToString())
                </table>  
    </div> 
     @Html.Hidden("hdjsAlert", (ViewData["jsAlert"]))
    @Html.Hidden("hdFYear", ViewData["FYear"])  
   
}
</body>
</html>
